<h1>Agenda</h1>
<br/>
<div class="row-fluid" >
    <div class="span6">
        <h2>Rutas agendadas</h2>
        <table class="table table-striped table-bordered table-condensed table-hover" id='schedules'>
            <thead>
                <tr>
                    <th>#</th>
                    <th>Ruta</th>
                    <th>Fecha</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($view->schedules as $key => $schedule) : ?>
                    <tr <?php echo ($key == 0 ? 'class="success"' : ''); ?>>
                        <td><?php echo $key + 1; ?></td>
                        <td><?php echo '[' . $schedule['code'] . '] ' . $schedule['name']; ?></td>
                        <td><?php echo $schedule['route_date_format']; ?></td>
                    </tr>
                <?php endforeach; ?>
            </tbody>
        </table>
    </div>
    <div class="span6">
        <h2>Detalle ruta</h2>
        <!-- Aquí se inserta el detalle de la ruta-->
        <div id="detailRoute"></div>
    </div>
</div>
<script>
    $(document).ready(function() {
        $.post(urlDetailRoute, {}, function($html) {
            $('#detailRoute').html($html);
        });
    });
</script>